<?php

namespace App\Http\Validate\Purchase;

use App\Http\Validate\BaseValidate;

/**
 * 权限组验证器
 */
class PurchasePayOrderNew extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct($doaction = 'subedit')
    {
        if ($doaction == 'subedit') {
            $this->rule = [
                'id'=>'required',
                'pay_money'=>'required|integer|gt:0',
                'pay_at' => 'required',
                'screenshot_file'=>'required'
            ];
            $this->message = [
                'id.required' => '参数错误',
                'pay_money.required' => '办款金额不能为空',
                'pay_money.integer' => '单价需大于0',
                'pay_money.gt' => '单价需大于0',
                'pay_at.required' => '办款时间不能为空',
                'screenshot_file.required' => '办款截图未上传',
            ];
        }
    }
}
